package com.ry.core.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.ry.core.exception.BaseException;

public class SpringUtils {

	public static ApplicationContext getApplicationContext() {
		ApplicationContext ctx = new ClassPathXmlApplicationContext(
				new String[] { "config/applicationContext.xml",
						"config/springmvc-servlet.xml" });
		return ctx;
	}

	public static void main(String[] args) throws BaseException {
		ApplicationContext ctx = SpringUtils.getApplicationContext();
		// LeaseContractService bs = (LeaseContractService) ctx
		// .getBean("leaseContractService");
		//bs.getListSimple();
	}
}
